package com.hq.zb.exception;

import lombok.Data;

@Data
public class BizException extends RuntimeException {

    private Integer code;
    private String msg;
    private String developMsg;
    private String uri;

    public BizException(Integer code, String message) {
        this.code = code;
        this.msg = message;
    }

    public BizException(BizExceptionEnum bizExceptionEnum, String developMsg) {
        this.code = bizExceptionEnum.getCode();
        this.msg = developMsg;
        this.developMsg = developMsg;
    }

    public BizException(BizExceptionEnum bizExceptionEnum) {
        this.code = bizExceptionEnum.getCode();
        this.msg = bizExceptionEnum.getDesc();
        this.developMsg = bizExceptionEnum.getDesc();
    }
}
